<html>
<head>
    <css file="__PUBLIC__/css/body.css"/>
    <css file="__STATIC__/icon/icon.css"/>
    <js file="__STATIC__/jquery-1.7.2.min.js"/>
    <css file="__STATIC__/uploadify/uploadify.css"/>
    <js file="__STATIC__/uploadify/jquery.uploadify.js"/>
    <script>
        $(function() {
       	    $("#upload_s").uploadify({
          		    height        : 22,
              		swf           : '__STATIC__/uploadify/uploadify.swf',
              		uploader      : '{:U("Upload/upload_tp")}',
              		width         : 60,
                    multi         :false, //ture多文件，false单文件
                    queueID:'uploadify_ppt',
                    buttonText:'',
                    removeCompleted : true,
                    'onUploadSuccess':function(file,data,response){
                        if(data=='error') 
                        {
                            alert('上传出错，请检查原因!(文件大小/文件类型)');
                        }
                        else
                        {
                            $('#upload_ex').val(data);
                        }
                }
           	});
        });
    </script>
    <style type="text/css">
        .upload{
            list-style-type: none;
            margin:0px;
            padding:0px;
        }
        .upload li{
            float:left;
        }
    </style>
</head>
<body>
<form action="{:U('Advert/aaddhandle')}" method="post">
    <div class="top">
        <div class="position"><span class="icon icon-31"></span>当前位置：添加广告</div>
        <div class="top-title">
            <span class="icon icon-32"></span>
            <div class="top-tool">
                <input type="submit" class="button-b" value="提交保存"/>
                <input type="hidden" value="{$pid}" name="pid"/>
            </div>
        </div>
    </div>
    <div class="body">
        <table class="list-tb tableTd" border="0" cellpadding="0" cellspacing="4">
            <tr>
                <td width="10%" class="textRight">名称：</td>
                <td>
                    <input type="text" name="title" value=""/>
                </td>
            </tr>
            <tr>
                <td class="textRight">宽度：</td>
                <td>
                    <input type="text" name="awidth"   value=""/>
                </td>
            </tr>
            <tr>
                <td class="textRight">高度：</td>
                <td>
                    <input type="text" name="aheight"  value=""/>
                </td>
            </tr>
            <tr>
                <td class="textRight">附件：</td>
                <td>
                    <ul class="upload">
                        <li><input  type="text" name="attachment" id="upload_ex"/></li>
                        <li style="margin-left:5px;"><input type="file" name="upload_s" id="upload_s"/></li>
                        <li style="width:200px;margin-left:5px;"><div id="uploadify_ppt"></li>
                    </ul>
                </td>
            </tr>
            <tr>
                <td class="textRight">内容：</td>
                <td>
                    <textarea name="info"></textarea>
                </td>
            </tr>
            <tr>
                <td class="textRight">是否启用：</td>
                <td>
                    <input type="radio" name="ls" checked="" value="1"/>启用
                    <input type="radio" name="ls" value="0"/>禁用
                </td>
            </tr>
            <tr>
                <td class="textRight">排序：</td>
                <td>
                    <input name="orders"/>
                </td>
            </tr>
        </table>
    </div>
</form>
</body>
</html>